﻿/* ######################################## *\
 * ### Copyright (C) 2009 AJ Ravindiran ### *
\* ######################################## */
using System;
using System.Timers;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AJRavindiran.Jolt.RuneScape.Events
{
    /// <summary>
    /// Represents a single event.
    /// </summary>
    public abstract class Event
    {
        #region Properties
        /// <summary>
        /// The interval between each loop.
        /// </summary>
        public long Interval { get; set; }
        /// <summary>
        /// Number of times the execution should be done.
        /// </summary>
        public int Iterations { get; set; }
        #endregion Properties

        #region Constructors
        /// <summary>
        /// Constructs a new event class.
        /// </summary>
        public Event(long interval, int iterations)
        {
            this.Interval = interval;
            this.Iterations = iterations;
        }

        /// <summary>
        /// Constructs a new event class.
        /// </summary>
        public Event(long interval)
        {
            this.Interval = interval;
            this.Iterations = 0;
        }
        #endregion Constructors

        #region Methods
        /// <summary>
        /// Execute module.
        /// </summary>
        public abstract void Execute(Object sender, ElapsedEventArgs e);
        #endregion Methods
    }
}
